package com.jycode.commons.model;

// Generated 2008-2-21 11:26:43 by Hibernate Tools 3.2.0.b9

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.jycode.commons.model.base.CmsBaseEntity;

/**
 * Thread generated by hbm2java
 */
@Entity
@Table(name = "CMS_THREAD", catalog = "TEST")
@SuppressWarnings("serial")
public class CmsThread extends CmsBaseEntity implements
		java.io.Serializable {

	private long id, catalogId = 0;
	private String title;
	private String subTitle;
	private int status = 0;
	private String contents;
	private String preface;
	private String sender, author;
	private Date timeSent;

	public CmsThread() {
		this.id = 0;
	}

	public CmsThread(long id) {
		this.id = id;
	}

	public CmsThread(long id, String title, long catalogId) {
		this.id = id;
		this.title = title;
		this.catalogId = catalogId;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "ID", unique = true, nullable = false)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Column(name = "TITLE", length=255)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CATALOG_ID")
	public long getCatalogId() {
		return catalogId;
	}

	public void setCatalogId(long parentId) {
		this.catalogId = parentId;
	}

	@Column(name = "TITLE_SUB")
	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	@Column(name = "STATUS")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "CONTENTS")
	@Basic(fetch = FetchType.LAZY)
	@Lob
	public String getContents() {
		return contents;
	}

	public void setContents(String contents) {
		this.contents = contents;
	}

	@Column(name = "PREFACE", length=1024)
	public String getPreface() {
		return preface;
	}

	public void setPreface(String preface) {
		this.preface = preface;
	}

	@Column(name = "SENDER", length=80)
	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	@Column(name = "AUTHOR", length=80)
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Column(name = "TIME_SENT")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getTimeSent() {
		return timeSent;
	}

	public void setTimeSent(Date timeSent) {
		this.timeSent = timeSent;
	}


}
